import React, { Component } from 'react'

const fn = (Com) => {
  return class extends Component {
    state = { count: 1}
    componentDidMount () {
      console.log(10000)
    }
    render () {
      return (
        <>
          <Com count = { this.state.count }/>
          <div>页面底部</div>
        </>
      )
    }
  }
}

// class Footer extends Component {
//   render () {
//     return (
//       <div>页面底部</div>
//     )
//   }
// }
class App extends Component {
  render() {
    return (
      <div>
        <h1>标题</h1>
        <div>内容 - { this.props.count }</div>
        {/* <Footer /> */}
      </div>
    )
  }
}
App = fn(App)
export default App